package com.bwie.controller;

import com.bwie.pojo.TbUser;
import com.bwie.service.TbUserService;
import com.bwie.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:Max
 * @Date: 2024/8/9 19:00
 * @Description
 **/
@RestController
@RequestMapping("/user/index")
public class UserController {
    @Autowired
    TbUserService tbUserService;


    /**
     * 增加
     */
    @PostMapping("/addList")
    public R addList(@RequestBody TbUser tbUser){
        return  tbUserService.addList(tbUser);
    }

    /**
     * 查询
     */
    @PostMapping("/selectlist")
    public R selectList(){
        return tbUserService.selectlist();
    }
}
